<!doctype html>
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">
	<title>Other views</title>

	<script src="../../codebase/dhtmlxscheduler.js?v=5.3.10" type="text/javascript" charset="utf-8"></script>
	<link rel="stylesheet" href="../../codebase/dhtmlxscheduler_material.css?v=5.3.10" type="text/css" charset="utf-8">
	<script src="../../codebase/ext/dhtmlxscheduler_agenda_view.js?v=5.3.10" type="text/javascript" charset="utf-8"></script>
	<script src="../../codebase/ext/dhtmlxscheduler_week_agenda.js?v=5.3.10" type="text/javascript" charset="utf-8"></script>
	<script src="../../codebase/ext/dhtmlxscheduler_grid_view.js?v=5.3.10" type="text/javascript" charset="utf-8"></script>
	<script src="../../codebase/ext/dhtmlxscheduler_tooltip.js?v=5.3.10"></script>

	<style type="text/css" >
		html, body {
			margin: 0;
			padding: 0;
			height: 100%;
			overflow: hidden;
		}
	</style>

	<script type="text/javascript" charset="utf-8">
		function init() {
			scheduler.config.rtl = true;

			scheduler.date.agenda_start = function(date){
				return scheduler.date.month_start(new Date(date)); 
			};
			scheduler.date.add_agenda = function(date, inc){
				return scheduler.date.add(date, inc, "month"); 
			};
			scheduler.attachEvent("onTemplatesReady", function(){
				scheduler.templates.agenda_date = scheduler.templates.month_date;
			});

			scheduler.createGridView({
				fields:[
					{id:"id"},
					{id:"text"},
					{id:"date"}
				],
				select:false,
				paging:true
			});

			scheduler.templates.week_agenda_event_text = function (start_date, end_date, event, date, position) {
				switch (position) {
					case "middle":
						return "-- " + event.text;
					case "end":
						return "End: " + scheduler.templates.event_date(start_date) + " " + event.text;
					case "start":
						return "Start: " + scheduler.templates.event_date(start_date) + " " + event.text;
					default:
						return scheduler.templates.event_date(start_date) + " " + event.text;
				}
			};
			scheduler.locale.labels.week_agenda_tab = "Week A.";

			scheduler.config.lightbox.sections=[	
				{ name:"description", height:50, map_to:"text", type:"textarea", focus:true },
				{ name:"location", height:43, map_to:"event_location", type:"textarea"  },
				{ name:"time", height:72, type:"time", map_to:"auto"}	
			];

			scheduler.init('scheduler_here', new Date(2018, 0, 10), "agenda");
			scheduler.load("../common/events.json");
		}
	</script>
</head>
<body onload="init();">
<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
	<div class="dhx_cal_navline">
		<div class="dhx_cal_prev_button">&nbsp;</div>
		<div class="dhx_cal_next_button">&nbsp;</div>
		<div class="dhx_cal_today_button"></div>
		<div class="dhx_cal_date"></div>
		<div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>
		<div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>
		<div class="dhx_cal_tab" name="agenda_tab" style="right:280px;"></div>
		<div class="dhx_cal_tab" name="week_agenda_tab" style="right:280px;"></div>
		<div class="dhx_cal_tab" name="grid_tab"></div>
		<div class="dhx_cal_tab" name="month_tab" style="right:76px;"></div>
	</div>
	<div class="dhx_cal_header">
	</div>
	<div class="dhx_cal_data">
	</div>
</div>
</body>
